<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>劳保页面</title>
<link href="${pageContext.request.contextPath }/css/metro.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath }/css/metro-schemes.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/css/metro-responsive.css"
	rel="stylesheet">
<script src="${pageContext.request.contextPath }/js/jquery-2.1.3.min.js"></script>
<script
	src="${pageContext.request.contextPath }/js/jquery.dataTables.min.js"></script>
<script src="${pageContext.request.contextPath }/js/metro.js"></script>
<script>
        function addRow(obj)
        {
        var table =document.getElementById("testTbl");
        var newTr = testTbl.insertRow();
        
        var newTd0 = newTr.insertCell();
        var newTd1 = newTr.insertCell();
        var newTd2 = newTr.insertCell();
        var newTd3 = newTr.insertCell();
        var newTd4 = newTr.insertCell();
        var newTd5 = newTr.insertCell();
        var newTd6 = newTr.insertCell();   
        var newTd7 = newTr.insertCell();
        var newTd8 = newTr.insertCell();
        var newTd9 = newTr.insertCell();
        newTd0.innerHTML = '标准'+ (table.rows.length-1); 
        newTd1.innerHTML = '<input type="text" name="test2"    style="width:40px;" maxlength="5">'; 
        newTd2.innerHTML = '<input type="text" name="test3"    style="width:40px;" maxlength="5">';
        newTd3.innerHTML = '<input type="text" name="test4"    style="width:40px;" maxlength="5">'; 
        newTd4.innerHTML = '<input type="text" name="test5"    style="width:40px;" maxlength="5">'; 
        newTd5.innerHTML = '<input type="text" name="test6"    style="width:40px;" maxlength="5">'; 
        newTd6.innerHTML = '<input type="text" name="test7"    style="width:40px;" maxlength="5">'; 
        newTd7.innerHTML = '<input type="text" name="test8"    style="width:40px;" maxlength="5">';
        newTd8.innerHTML = '<input type="text" name="test9"    style="width:40px;" maxlength="5">'; 
        newTd9.innerHTML= '<input type="button" onclick="DelRowNew(this);" value="—">';
        }        
        function DelRowNew(r){
        var i=r.parentNode.parentNode.rowIndex;
        document.getElementById('testTbl').deleteRow(i);
        }
        function selectAll(checkbox) {
            $('input[type=checkbox]').prop('checked', $(checkbox).prop('checked'));
        }
       
    </script>
</head>

<body>
	<div class="accordion large-heading" data-role="accordion">
		<div class="frame">
			<div class="heading">制定标准</div>
			<div class="content">
				<table id="testTbl"
					class="table striped hovered cell-hovered border bordered">
					<thead>
						<tr>
							<th>标准/名称</th>
							<th>毛巾</th>
							<th>肥皂</th>
							<th>肥皂粉</th>
							<th>香皂</th>
							<th>洗衣液</th>
							<th>线手套</th>
							<th>耳套</th>
							<th>口罩</th>
							<th>删除</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td>标准1</td>
							<td>4</td>
							<td>6</td>
							<td>6</td>
							<td>6</td>
							<td>2</td>
							<td>0</td>
							<td>0</td>
							<td>0</td>
						</tr>
						<tr>
							<td>标准2</td>
							<td>4</td>
							<td>12</td>
							<td>12</td>
							<td>6</td>
							<td>2</td>
							<td>12</td>
							<td>0</td>
							<td>0</td>
						</tr>
					</tbody>
				</table>
				<input id="inputb" type="button" onclick="addRow(this);"
					value="+新增标准">
			</div>
		</div>
		<div class="frame active">
			<div class="heading">分配标准</div>
			<div class="content">
				<table id="labourdistribution"
					class="table striped hovered cell-hovered border bordered">
					<thead>
						<tr>
							<th>部门</th>
							<th>分配标准</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach var="department" items="${departments }">
							<tr>
								<td>${department.name}</td>
								<td>b</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</body>
</html>

